<template>
  <div class="h-100">
    <component :is="curView" ref="cutover" @add="add" @close="close" />
  </div>
</template>
<script>
  import MigrationList from './components/MigrationList'
  import AddPlan from './components/AddPlan'
  export default {
    components: {
      MigrationList,
      AddPlan
    },
    data() {
      return {
        curView: 'MigrationList'
      }
    },
    methods: {
      add() {
        this.curView = 'AddPlan'
      },
      close() {
        this.curView = 'MigrationList'
        this.$nextTick(() => {
          this.$refs.cutover.loadData()
        })
      }
    }
  }
</script>
